@extends('_layouts.login')

@section('page-level-styles')
{{ HTML::style('assets/global/plugins/select2/select2.css') }}
@stop

@section('theme-styles')
{{ HTML::style('assets/admin/pages/css/login.css') }}

@stop

@section('page-level-plugins')
{{ HTML::script('assets/global/plugins/jquery-validation/js/jquery.validate.min.js') }}
{{ HTML::script('assets/global/plugins/select2/select2.min.js') }}
@stop

@section('page-level-script')
{{ HTML::script('assets/admin/pages/scripts/login.js') }}
@stop

@section('script-tag')
var text_error_requirement = '{{ trans('login.error-requirement') }}';
var text_error_userid = '{{ trans('login.error-userid') }}';
var text_error_password = '{{ trans('login.error-password') }}';
@stop

@section('jquery-document-ready')
Login.init();
@stop

@section('page-content')
{{-- */$errors = $errors->first("password") ? $errors->first("password") : null;/* --}}
<!-- BEGIN LOGIN FORM -->
<form class="login-form" action="" method="post">
    <h3 class="form-title text-center">{{ trans('login.title') }}</h3>
    <div class="alert alert-danger {{ $errors ? null : 'display-hide' }}">
        <button class="close" data-close="alert"></button>
        <span>
            {{ $errors or null }}
        </span>
    </div>
    <div class="form-group">
        <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
        <label class="control-label visible-ie8 visible-ie9">{{ trans('user.userid') }}</label>
        <div class="input-icon">
            <i class="fa fa-user"></i>
            <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="{{ trans('user.userid') }}" name="username" value="{{ Input::old('username') }}"/>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label visible-ie8 visible-ie9">{{ trans('user.password') }}</label>
        <div class="input-icon">
            <i class="fa fa-lock"></i>
            <input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="{{ trans('user.password') }}" name="password"/>
        </div>
    </div>
    <div class="form-actions">
        <label class="checkbox">
            <input type="checkbox" name="remember" value="1"/> {{ trans('login.remember-me') }} </label>
        <button type="submit" class="btn green pull-right">
            {{ trans('system.login') }} <i class="m-icon-swapright m-icon-white"></i>
        </button>
    </div>
</form>
<!-- END LOGIN FORM -->
@stop